<%--
    Document   : view fragment for task
    Created on : Mar 10, 2014, 10:54:45 PM
    Author     : Anton Strack
--%>
<article id="${bean.id}" class="panel">
    <div class="panel-heading"><h3 class="panel-title">${bean.name}</h3></div>
    <div class="panel-body">
        <p>Task type: ${bean.getDerivedValue("ActionTypeName")} ${bean.getDerivedValue("PostResourceTypeName")}</p>
        <p>The task is for: ${bean.getDerivedValue("RecipientName")} and its status is: ${bean.getDerivedValue("StateName")} as of <csd:displayTimestamp timestamp="${bean.statusDate}"></csd:displayTimestamp></p>
        <p>
            ${bean.description}
        </p>
        <p><a href="${req.contextPath}?action=start&resource=task&id=${bean.id}">Start the ${bean.getDerivedValue("ActionTypeName")} ${bean.getDerivedValue("PostResourceTypeName")} task now.</a></p>
    </div>
    <div class="panel-footer">
        <p>Created By: ${bean.getDerivedValue("CreatedByName")} on <csd:displayTimestamp timestamp="${bean.createdDate}"></csd:displayTimestamp>
        <c:if test="${bean.createdDate != bean.updatedDate}">
            and updated
            <c:if test="${bean.updatedById != bean.createdById}">
                by: ${bean.getDerivedValue("UpdatedByName")}
            </c:if>
            on <csd:displayTimestamp timestamp="${bean.updatedDate}"></csd:displayTimestamp>
        </c:if>
    </p><p><a href="${req.contextPath}?action=delete&resource=task&id=${bean.id}">Delete Task</a> | <a href="${req.contextPath}?action=update&resource=task&id=${bean.id}">Update Task</a></p>
</div>
</article>

